package com.unknow.first.dapp.admin.account.config;

import com.unknow.first.dapp.admin.account.job.*;
import com.unknow.first.dapp.admin.account.mapper.AddressAccountDetailMapper;
import com.unknow.first.dapp.admin.account.service.AddressRechargeService;
import com.unknow.first.dapp.admin.account.service.AddressWithdrawService;
import com.unknow.first.dapp.admin.account.service.PayLogsService;
import org.cloud.core.redis.RedisUtil;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AddressAccountJobConfig {

    @Bean
    Erc20PayJob erc20PayJob(RedisUtil redisUtil, PayLogsService payLogsService) {
        return new Erc20PayJob(redisUtil, payLogsService);
    }
    @Bean
    ERC20PayConfirmJob erc20PayConfirmJob(RedisUtil redisUtil, AddressRechargeService addressRechargeService) {
        return new ERC20PayConfirmJob(redisUtil, addressRechargeService);
    }

    @Bean
    Erc20WithdrawJob erc20WithdrawJob(RedisUtil redisUtil, AddressWithdrawService addressWithdrawService) {
        return new Erc20WithdrawJob(redisUtil, addressWithdrawService);
    }

    @Bean
    BackupAccountDetailJob backupAccountDetailJob(RedisUtil redisUtil, AddressAccountDetailMapper addressAccountDetailMapper) {
        return new BackupAccountDetailJob(redisUtil, addressAccountDetailMapper);
    }

    @Bean
    ProcessWithdrawOrderStatusSuccessJob processWithdrawOrderStatusSuccessJob(AddressWithdrawService addressWithdrawService) {
        return new ProcessWithdrawOrderStatusSuccessJob(addressWithdrawService);
    }
}
